﻿using System;
using System.Xml.Serialization;

namespace Draco.OWF.Metadata
{
    public class DataItem
    {
        [XmlAttribute("name")]
        public string Name { get; set; }
        [XmlAttribute("dataType")]
        public String DataType { get; set; }
        [XmlAttribute("required")]
        public Boolean Required { get; set; }
        [XmlText]
        public string Value { get; set; }

        public DataItem()
        {
        }

        public DataItem(String name, String value):this(name, value,"String")
        {
        }
        public DataItem(String name,String value,String dataType):this(name, value, dataType,false)
        {
        }

        public DataItem(String name, String value, String dataType,bool required)
        {
            this.Name = name;
            this.Value = value;
            this.DataType = dataType;
            this.Required = required;
        }
    }
}
